# -*- coding: utf-8 -*-
"""
Created on Tue Jun  5 21:16:41 2018

@author: Administrator
"""

#%%
#make mask before Z_standardize

from agilepipe.process import  Create_groupmask

source_dirpath = r'/media/root/Elements4/XuanWu_last/CBF_processing/CBF_clear_background_SN_SR_del-subj24'
mnimask_filepath = r'/root/Documents/BrainMask_05_61x73x61.nii'
great_groupmask = Create_groupmask([source_dirpath,mnimask_filepath])



#%%
#perform Z_standardiz

from agilepipe.process import Z_standardize #,Mean_division

previous_dirpath = r'/media/root/Elements4/XuanWu_last/BOLD_processing/Results/Dpb_sm-6_del-subj24'
mask_filepath = r'/media/root/Elements4/XuanWu_last/mask/GM_mask/T1_SC_SS_GM_SN_SR_mean_threshold-0.5/T1_SC_SS_GM_SN_SR_mean_threshold-0.5.nii'
present_dirpath = r'/media/root/Elements4/XuanWu_last/BOLD_processing/Results/Dpb_sm-6_del-subj24_z'

Z_standardize([previous_dirpath,mask_filepath,present_dirpath])


#%%


from agilepipe.process import Z_standardize #,Mean_division

previous_dirpath = r'/media/root/Elements4/XuanWu_last/BOLD_processing/Results/fALFF_del-subj24'
mask_filepath = r'/media/root/Elements4/XuanWu_last/mask/GM_mask/T1_SC_SS_GM_SN_SR_mean_threshold-0.5/T1_SC_SS_GM_SN_SR_mean_threshold-0.5.nii'
present_dirpath = r'/media/root/Elements4/XuanWu_last/BOLD_processing/Results/fALFF_del-subj24_z'

Z_standardize([previous_dirpath,mask_filepath,present_dirpath])

#%%

from agilepipe.process import Z_standardize #,Mean_division

previous_dirpath = r'/media/root/Elements4/XuanWu_last/BOLD_processing/Results/ReHo_del-subj24'
mask_filepath = r'/media/root/Elements4/XuanWu_last/mask/GM_mask/T1_SC_SS_GM_SN_SR_mean_threshold-0.5/T1_SC_SS_GM_SN_SR_mean_threshold-0.5.nii'
present_dirpath = r'/media/root/Elements4/XuanWu_last/BOLD_processing/Results/ReHo_del-subj24_z'

Z_standardize([previous_dirpath,mask_filepath,present_dirpath])





